<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>ShakesBeare - Company</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8" />

    <link rel="icon" type="image/ico" href="http://tattek.com/minimal/assets/images/favicon.ico" />
    <!-- Bootstrap -->
    <link href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/admin/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/animate/animate.min.css">
    <link type="text/css" rel="stylesheet" media="all" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/mmenu/css/jquery.mmenu.all.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/videobackground/css/jquery.videobackground.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/bootstrap-checkbox.css">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/rickshaw/css/rickshaw.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/morris/css/morris.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/tabdrop/css/tabdrop.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/summernote/css/summernote.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/summernote/css/summernote-bs3.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/css/chosen.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/css/chosen-bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/css/chosen.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/css/chosen-bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/datepicker/css/bootstrap-datetimepicker.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/colorpicker/css/bootstrap-colorpicker.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/colorpalette/bootstrap-colorpalette.css">

    <link href="${pageContext.request.contextPath}/static/admin/assets/css/minimal.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/admin/css/sweetalert.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
<body class="bg-1">



<!-- Preloader -->
<div class="mask"><div id="loader"></div></div>
<!--/Preloader -->

<!-- Wrap all page content here -->
<div id="wrap">




    <!-- Make page fluid -->
    <div class="row">





        <!-- Fixed navbar -->
        <div class="navbar navbar-default navbar-fixed-top navbar-transparent-black mm-fixed-top" role="navigation" id="navbar">



            <!-- Branding -->
            <div class="navbar-header col-md-2">
                <a class="navbar-brand" href="index.html">
                    <strong>Shakes</strong>Beare
                </a>
                <div class="sidebar-collapse">
                    <a href="#">
                        <i class="fa fa-bars" style="line-height: 45px"></i>
                    </a>
                </div>
            </div>
            <!-- .nav-collapse -->
            <div class="navbar-collapse">
                <!-- Quick Actions -->
                <ul class="nav navbar-nav quick-actions">
                    <li class="dropdown divided">

                        <a class="dropdown-toggle button" data-toggle="dropdown" href="#">
                            <i class="fa fa-envelope"></i>
                            <span class="label label-transparent-black">1</span>
                        </a>

                        <ul class="dropdown-menu wider arrow nopadding messages">
                            <li><h1>You have <strong>1</strong> new message</h1></li>
                            <li>
                                <a class="cyan" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/ici-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">Ing. Imrich Kamarel</span>
                                        <span class="time">12 mins</span>
                                        <div class="message-content">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a class="green" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/arnold-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">Arnold Karlsberg</span>
                                        <span class="time">1 hour</span>
                                        <div class="message-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/face.jpeg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">John Douey</span>
                                        <span class="time">3 hours</span>
                                        <div class="message-content">Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a class="red" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/peter-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">Peter Kay</span>
                                        <span class="time">5 hours</span>
                                        <div class="message-content">Ut enim ad minim veniam, quis nostrud exercitation</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a class="orange" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/george-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">George McCain</span>
                                        <span class="time">6 hours</span>
                                        <div class="message-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit</div>
                                    </div>
                                </a>
                            </li>


                            <li class="topborder"><a href="#">Check all messages <i class="fa fa-angle-right"></i></a></li>
                        </ul>

                    </li>
                    <li class="dropdown divided user" id="current-user">
                        <div class="profile-photo">
                            <img src="${pageContext.request.contextPath}/static/admin/assets/images/face.jpeg" alt />
                        </div>
                        <a class="dropdown-toggle options" data-toggle="dropdown" href="#">
                            管理员 <i class="fa fa-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu arrow settings">

                            <li>

                                <h3>Backgrounds:</h3>
                                <ul id="color-schemes">
                                    <li><a href="#" class="bg-1"></a></li>
                                    <li><a href="#" class="bg-2"></a></li>
                                    <li><a href="#" class="bg-3"></a></li>
                                    <li><a href="#" class="bg-4"></a></li>
                                    <li><a href="#" class="bg-5"></a></li>
                                    <li><a href="#" class="bg-6"></a></li>
                                </ul>

                                <div class="form-group videobg-check">
                                    <div class="col-xs-4 control-label">
                                        <div class="onoffswitch greensea small">
                                            <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="videobg-check">
                                        </div>
                                    </div>
                                </div>

                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="${pageContext.request.contextPath }/admin/setting/index.action"><i class="fa fa-user"></i>修改密码</a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath }/admin/logout.action"><i class="fa fa-power-off"></i> Logout</a>
                            </li>
                            <li></li>

                        </ul>
                    </li>


                </ul>
                <!-- /Quick Actions -->



                <!-- Sidebar -->
                <ul class="nav navbar-nav side-nav" id="sidebar">

                    <li class="collapsed-content">
                        <ul>
                            <li class="search"><!-- Collapsed search pasting here at 768px --></li>
                        </ul>
                    </li>

                    <li class="navigation" id="navigation">
                        <a href="#" class="sidebar-toggle" data-toggle="#navigation">Navigation <i class="fa fa-angle-up"></i></a>

                        <ul class="menu">

                            <li>
                                <a href="${pageContext.request.contextPath }/admin/index/index.action">
                                    <i class="fa fa-tachometer"></i> 概况
                                    <span class="badge badge-red"></span>
                                </a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath}/admin/ad/index.action">
                                    <i class="fa fa-tint"></i> 广告管理
                                </a>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-th-large"></i> 用户管理 <b class="fa fa-plus dropdown-plus"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="${pageContext.request.contextPath}/admin/customer/index.action">
                                            <i class="fa fa-caret-right"></i> 用户管理
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${pageContext.request.contextPath}/admin/customer/resumeIndex.action">
                                            <i class="fa fa-caret-right"></i> 简历管理
                                        </a>
                                    </li>
                                </ul>
                            </li>

                            <li class="dropdown open active">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-th-large"></i> 企业管理 <b class="fa fa-plus dropdown-plus"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="${pageContext.request.contextPath }/admin/company/index.action">
                                            <i class="fa fa-caret-right"></i> 企业用户账号
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${pageContext.request.contextPath }/admin/company/verify.action">
                                            <i class="fa fa-caret-right"></i> 企业账号审核
                                        </a>
                                    </li>
                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-child"></i> 职位管理 <b class="fa fa-plus dropdown-plus"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="${pageContext.request.contextPath }/admin/job/index.action">
                                            <i class="fa fa-caret-right"></i> 职位列表
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                </ul>
                <!-- Sidebar end -->





            </div>
            <!--/.nav-collapse -->





        </div>
        <!-- Fixed navbar end -->






        <!-- Page content -->
        <div id="content" class="col-md-12">









            <!-- page header -->
            <div class="pageheader">
                <h2><i class="fa fa-thumb-tack" style="line-height: 48px;padding-left: 1px;"></i> 企业信息与认证信息 <span>信息维护</span></h2>
            </div>
            <!-- /page header -->






            <!-- content main container -->

            <div class="main">
                <!--具体功能框架写在这里-->

                <!-- row -->
                <div class="row">

                    <!-- col 12 -->
                    <div class="col-md-6">



                        <!-- tile -->
                        <section class="tile color transparent-black">



                            <!-- tile header -->
                            <div class="tile-header">
                                <h1><strong>企业</strong> 用户信息</h1>
                                <div class="controls">
                                    <a href="#" class="refresh"><i class="fa fa-refresh"></i></a>
                                    <a href="#" class="remove"><i class="fa fa-times"></i></a>
                                </div>
                            </div>
                            <!-- /tile header -->

                            <!-- tile body -->
                            <div class="tile-body">

                                <form class="form-horizontal" role="form" id="company">

                                    <div class="form-group">
                                        <label for="input01" class="col-sm-4 control-label">企业名称</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" readonly = "" id="input01" value="${company.company_name}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input02" class="col-sm-4 control-label">所在地</label>
                                        <div class="col-sm-8">
                                            <select class="chosen-select chosen-transparent form-control" id="input02" onchange="changeZone()">
                                                <c:forEach items="${zone_list }" var="item">
                                                    <c:choose>
                                                        <c:when test="${item.name == company.zone_name}">
                                                            <option value="${item.zone_id}" selected>${item.name}</option>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <option value="${item.zone_id}">${item.name}</option>
                                                        </c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                            </select>
                                        </div>
                                        <label for="input03" class="col-sm-4 control-label"> </label>
                                        <div class="col-sm-8" style="margin-top: 1px">
                                            <select class="chosen-select chosen-transparent form-control" id="input03" onchange="changeCity()">
                                                <c:forEach items="${city_list }" var="item">
                                                    <c:choose>
                                                        <c:when test="${item.name == company.city_name}">
                                                            <option value="${item.city_id}" selected>${item.name}</option>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <option value="${item.city_id}">${item.name}</option>
                                                        </c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input04" class="col-sm-4 control-label">联系人</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="input04" value="${company.contact}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-4 control-label"> </label>
                                        <div class="col-sm-8">
                                            <div class="radio radio-transparent">
                                                <c:choose>
                                                    <c:when test="${company.contact_sex == 'M'}">
                                                        <input type="radio" name="sex" id="optionsRadios1" value="M" checked>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <input type="radio" name="sex" id="optionsRadios1" value="M">
                                                    </c:otherwise>
                                                </c:choose>
                                                <label for="optionsRadios1">先生</label>
                                            </div>
                                            <div class="radio radio-transparent">
                                                <c:choose>
                                                    <c:when test="${company.contact_sex == 'F'}">
                                                        <input type="radio" name="sex" id="optionsRadios2" value="F" checked>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <input type="radio" name="sex" id="optionsRadios2" value="F">
                                                    </c:otherwise>
                                                </c:choose>
                                                <label for="optionsRadios2">女士</label>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="zone_num" class="col-sm-4 control-label">联系电话</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="zone_num" placeholder="区号"  value="${company.zone_num}">
                                        </div>
                                        <div class="col-sm-5">
                                            <input type="text" class="form-control" id="input05" placeholder="固定电话"  value="${company.phone}">
                                        </div>
                                        <label for="input06" class="col-sm-4 control-label"> </label>
                                        <div class="col-sm-8" style="margin-top: 1px">
                                            <input type="text" class="form-control" id="input06" placeholder="手机号码"  value="${company.telephone}">
                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <label for="input07" class="col-sm-4 control-label">用户名</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="input07" value="${company.fullname}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="input08" class="col-sm-4 control-label">电子邮箱</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="input08" value="${company.e_mail}">
                                        </div>
                                    </div>

                                    <div class="form-group form-footer">
                                        <div class="col-sm-offset-4 col-sm-8">
                                            <a class="btn btn-primary" href="javascript:save_company()">提交</a>
                                            <button type="reset" class="btn btn-default">重置</button>
                                            <button type="button" class="btn btn-orange"><a href="${pageContext.request.contextPath}/admin/company/detail.action?company_id=${company.company_id}" style="color: white">返回</a></button>
                                        </div>
                                    </div>

                                </form>

                            </div>
                            <!-- /tile body -->




                        </section>
                        <!-- /tile -->




                    </div>
                    <!-- /col 6 -->


                    <!-- col 12 -->
                    <div class="col-md-6">



                        <!-- tile -->
                        <section class="tile color transparent-white">



                            <!-- tile header -->
                            <div class="tile-header">
                                <h1><strong>企业</strong> 认证信息</h1>
                                <div class="controls">
                                    <a href="#" class="refresh"><i class="fa fa-refresh"></i></a>
                                    <a href="#" class="remove"><i class="fa fa-times"></i></a>
                                </div>
                            </div>
                            <!-- /tile header -->



                            <!-- tile body -->
                            <div class="tile-body">

                                <form class="form-horizontal" role="form">

                                    <div class="form-group">
                                        <label for="input09" class="col-sm-4 control-label">企业名称</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" readonly = "" id="input09" value="${company.company_name}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input10" class="col-sm-4 control-label">主要行业</label>
                                        <div class="col-sm-8">
                                            <select class="chosen-select chosen-transparent form-control" id="input10">
                                                <c:forEach items="${industry_list }" var="item">
                                                    <c:choose>
                                                        <c:when test="${item.industry_name == main_industry.industry_name}">
                                                            <option value="${item.industry_id}" selected>${item.industry_name}</option>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <option value="${item.industry_id}">${item.industry_name}</option>
                                                        </c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input11" class="col-sm-4 control-label">次要行业</label>
                                        <div class="col-sm-8">
                                            <select class="chosen-select chosen-transparent form-control" id="input11">
                                                <c:forEach items="${industry_list }" var="item">
                                                    <c:choose>
                                                        <c:when test="${item.industry_name == sec_industry.industry_name}">
                                                            <option value="${item.industry_id}" selected>${item.industry_name}</option>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <option value="${item.industry_id}">${item.industry_name}</option>
                                                        </c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input12" class="col-sm-4 control-label">公司性质</label>
                                        <div class="col-sm-8">
                                            <select class="chosen-select chosen-transparent form-control" id="input12">
                                                <c:forEach items="${property_list }" var="item">
                                                    <c:choose>
                                                        <c:when test="${item.property_name == company_detail.company_property.property_name}">
                                                            <option value="${item.company_property_id}" selected>${item.property_name}</option>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <option value="${item.company_property_id}">${item.property_name}</option>
                                                        </c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input13" class="col-sm-4 control-label">公司规模</label>
                                        <div class="col-sm-8">
                                            <select class="chosen-select chosen-transparent form-control" id="input13">
                                                <c:forEach items="${size_list }" var="item">
                                                    <c:choose>
                                                        <c:when test="${item.value == company_detail.company_size.value}">
                                                            <option value="${item.company_size_id}" selected>${item.value}</option>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <option value="${item.company_size_id}">${item.value}</option>
                                                        </c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input14" class="col-sm-4 control-label">公司邮箱</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="input14" readonly="" value="${company.e_mail}">
                                        </div>
                                    </div>

                                    <div class="form-group transparent-editor">
                                        <label for="input15" class="col-sm-4 control-label">公司介绍</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="input15" value="${company_detail.indroduce}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input16" class="col-sm-4 control-label">招聘联系人</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="input16" value="${company_detail.recruit_contact}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="d_zone_num" class="col-sm-4 control-label">联系电话</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="d_zone_num" placeholder="区号" value="${company_detail.zone_num}">
                                        </div>
                                        <div class="col-sm-5">
                                            <input type="text" class="form-control" id="input17" placeholder="固定电话" value="${company_detail.phone}">
                                        </div>
                                        <label for="input18" class="col-sm-4 control-label"> </label>
                                        <div class="col-sm-8" style="margin-top: 1px">
                                            <input type="text" class="form-control" id="input18" placeholder="手机号码"  value="${company_detail.telephone}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="input19" class="col-sm-4 control-label">公司地址</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" readonly = "" id="input19" value="${company.zone_name}">
                                        </div>
                                        <label for="input20" class="col-sm-4 control-label"> </label>
                                        <div class="col-sm-8" style="margin-top: 1px">
                                            <input type="text" class="form-control" readonly = "" id="input20" value="${company.city_name}">
                                        </div>
                                        <label for="input21" class="col-sm-4 control-label"> </label>
                                        <div class="col-sm-8" style="margin-top: 1px">
                                            <input type="text" class="form-control" id="input21" value="${company_detail.address}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-4 control-label">上传营业执照</label>
                                        <div class="col-sm-8">
                                            <div class="input-group">
                                                <span class="input-group-btn">
                                                    <span class="btn btn-primary btn-file">
                                                      <i class="fa fa-upload"></i><input type="file" id="input22" name="input22" onchange="readFile(this)">
                                                    </span>
                                                </span>
                                                <input type="text" class="form-control" readonly="" placeholder="支持GIF、JPG、PNG格式">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-4 control-label">预览</label>
                                        <div class="col-sm-8">
                                            <div class="img-box" style="border: 1px solid; border-radius: 3px">
                                                <img src="${pageContext.request.contextPath}/upload/company/${company_detail.licence_url}" style="width: 100%;min-height: 150px" alt="暂无上传营业执照" id="licence">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-4 control-label" style="font-size: 150%" >认证状态</label>
                                        <div class="col-sm-8">
                                            <c:choose>
                                                <c:when test="${company_detail.status == 0}">
                                                    <input type="text" class="form-control" readonly = "" value="待审核">
                                                </c:when>
                                                <c:when test="${company_detail.status == 1}">
                                                    <input type="text" class="form-control" readonly = "" value="已认证">
                                                </c:when>
                                                <c:otherwise>
                                                    <input type="text" class="form-control" readonly = "" value="审核不通过">
                                                </c:otherwise>
                                            </c:choose>
                                        </div>
                                    </div>

                                    <div class="form-group form-footer footer-white">
                                        <div class="col-sm-offset-4 col-sm-8">
                                            <a class="btn btn-greensea" href="javascript:save_company_detail()">提交</a>
                                            <button type="reset" class="btn btn-red">重置</button>
                                            <button type="button" class="btn btn-hotpink"><a href="${pageContext.request.contextPath}/admin/company/detail.action?company_id=${company.company_id}" style="color: white">返回</a></button>
                                        </div>
                                    </div>

                                </form>

                            </div>
                            <!-- /tile body -->




                        </section>
                        <!-- /tile -->




                    </div>
                    <!-- /col 6 -->



                </div>
                <!-- /row -->
            </div>
            <!-- /content container -->

        </div>
        <!-- Page content end -->


    </div>
    <!-- Make page fluid-->




</div>
<!-- Wrap all page content end -->



<section class="videocontent" id="video"></section>




<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="${pageContext.request.contextPath}/static/admin/assets/js/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/bootstrap/bootstrap.min.js"></script>
<!--<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?lang=css&skin=sons-of-obsidian"></script>-->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/mmenu/js/jquery.mmenu.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/sparkline/jquery.sparkline.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/nicescroll/jquery.nicescroll.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/animate-numbers/jquery.animateNumbers.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/videobackground/jquery.videobackground.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/blockui/jquery.blockUI.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/summernote/summernote.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/chosen.jquery.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/momentjs/moment-with-langs.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/datepicker/bootstrap-datetimepicker.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/colorpicker/bootstrap-colorpicker.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/colorpalette/bootstrap-colorpalette.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/minimal.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/js/sweetalert.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/js/ajaxupload.js"></script>

<script>



    function readFile(obj){
        var file = obj.files[0];
        //判断类型是不是图片
        if(!/image\/\w+/.test(file.type)){
            alert("请确保文件为图像类型");
            return false;
        }
        var reader = new FileReader();
        reader.readAsDataURL(file);
        reader.onload = function(e){
            $('#licence').attr('src',this.result);

        }
    }


    $(function(){

        //load wysiwyg editor
        $('#input15').summernote({
            toolbar: [
                //['style', ['style']], // no style button
                ['style', ['bold', 'italic', 'underline', 'clear']],
                ['fontsize', ['fontsize']],
                ['color', ['color']],
                ['para', ['ul', 'ol', 'paragraph']],
                ['height', ['height']],
                //['insert', ['picture', 'link']], // no insert buttons
                //['table', ['table']], // no table button
                //['help', ['help']] //no help button
            ],
            height: 137   //set editable area's height
        });

        //chosen select input
        $(".chosen-select").chosen({disable_search_threshold: 10});

        //initialize datepicker
        $('#datepicker').datetimepicker({
            icons: {
                time: "fa fa-clock-o",
                date: "fa fa-calendar",
                up: "fa fa-arrow-up",
                down: "fa fa-arrow-down"
            }
        });

        $("#datepicker").on("dp.show",function (e) {
            var newtop = $('.bootstrap-datetimepicker-widget').position().top - 45;
            $('.bootstrap-datetimepicker-widget').css('top', newtop + 'px');
        });

        $('#input15').code('${company_detail.indroduce}');

    })

</script>
<script>
    function save_company(){
        var company_name = $('#input01').val();
        var city_id = $('#input03').val();
        var contact = $('#input04').val();
        var contact_sex = $('input:radio[name=sex]:checked').val();
        var phone = $('#input05').val();
        var zone_num = $('#zone_num').val();
        var telephone = $('#input06').val();
        var fullname = $('#input07').val();
        var e_mail = $('#input08').val();
        if(contact == ""||phone == "" || telephone==""||fullname=="" ||e_mail==""||zone_num==""){
            swal("","请填写完整用户信息！","error");
            return;
        }
        $.ajax({
            type:'post',
            url:'${pageContext.request.contextPath}/admin/company/save_company.action',
            contentType:'application/json;charset=utf-8',
            data:'{"company_id":${company.company_id},"company":"'+company_name+'","city_id":'+city_id+',"contact":"'+contact+'","contact_sex":"'+contact_sex+'","zone_num":"'+zone_num+'","phone":"'+phone+'","telephone":"'+telephone+'","fullname":"'+fullname+'","e_mail":"'+e_mail+'"}',
            success:function(data){
                if(data == -1){
                    swal("","请填写完整用户信息！","error");
                }
                if(data == 1){
                    swal("","保存成功！","success");
                }else{
                    swal("","服务器出错！","error");
                }
            }

        });
    }

    function save_company_detail() {
        var main_industry_id = $('#input10').val();
        var sec_industry_id = $('#input11').val();
        var company_property_id = $('#input12').val();
        var company_size_id = $('#input13').val();
        var indroduce = $('#input15').code();
        var recruit_contact = $('#input16').val();
        var zone_num = $('#d_zone_num').val();
        var phone = $('#input17').val();
        var telephone = $('#input18').val();
        var address = $('#input21').val()
        if(indroduce == ""||phone == "" || telephone=="" ||recruit_contact==""||zone_num==""||address==""){
            swal("","请填写完整用户信息！","error");
            return;
        }
        $.ajaxFileUpload({
            url : '${pageContext.request.contextPath}/admin/company/save_company_detail.action', //用于文件上传的服务器端请求地址
            secureuri : false, //一般设置为false
            fileElementId : 'input22', //文件上传空间的id属性  <input type="file" id="file" name="file" />
            type : 'post',
            dataType : 'json', //返回值类型 一般设置为json
            data:{
                company_id:  ${company.company_id},
                main_industry_id:main_industry_id,
                sec_industry_id:sec_industry_id,
                company_property_id:company_property_id,
                company_size_id:company_size_id,
                indroduce:indroduce,
                address:address,
                recruit_contact:recruit_contact,
                zone_num:zone_num,
                phone:phone,
                telephone:telephone
            },
            success : function(data, status) //服务器成功响应处理函数
            {
                console.log(data);
                if(data == -1){
                    swal("","请填写完整用户信息！","error");
                }
                if(data == 1){
                    swal("","保存成功！","success");
                }else{
                    swal("","服务器出错！","error");
                }
                // alert(data.msg);
            },
            error : function(data, status, e)//服务器响应失败处理函数
            {
                swal("","服务器出错！","error");
                // alert(data.msg);
            }
        });
        return false;
    }

    function changeZone(){
        var zone_id = $('#input02').val();
        $.ajax({
            type:'post',
            url:'${pageContext.request.contextPath}/admin/company/getCityList.action',
            data:'zone_id='+zone_id,
            success:function(data){
                var string="";
                for(var i in data){
                    string +='<option value="'+data[i].city_id+'">'+data[i].name+'</option>';
                }
                $('#input03').html(string);
                $("#input03").trigger("chosen:updated");
                var zone_name =  $("#input02 option:selected").html();
                $('#input19').val(zone_name);
                var city_name =  $("#input03 option:selected").html();
                $('#input20').val(city_name);
            }

        });
    }

    function changeCity(){
        var city_name =  $("#input03 option:selected").html();
        $('#input20').val(city_name);
    }
</script>
</body>
</html>


